public class MyList<E> {

    public Object[] list=new Object[0];
    int size;
    public MyList(){

    }
    public boolean add(E e){
        list[size]=e;
        size++;
        list=new Object[size];
        return true;
    }
    public E get(int index){
        if(index<0)
            throw new IndexOutOfBoundsException();
        if(index==0)
            return (E) list[index];
         return (E) list[index-1];
    }
}
